﻿@model IEnumerable<Sohobloo.SoAuth.Web.Models.ActionModel>

<h2>Action </h2>
<p>Function: @ViewBag.FunctionName</p>
@Html.ActionLink("Back", "Index", "Function")
@Html.ActionLink("Create", "Add", new {id = ViewBag.FunctionId})
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(a => a.ActionName)
        </th>
        <th>
            @Html.DisplayNameFor(a => a.ActionPath)
        </th>
        <th>
            @Html.DisplayNameFor(a => a.ActionEnabled)
        </th>
        <th>
            @Html.DisplayNameFor(a => a.IgnoreControl)
        </th>
        <th>
        </th>
    </tr>
    @foreach (var action in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(m => action.ActionName)
            </td>
            <td>
                @Html.DisplayFor(m => action.ActionPath)
            </td>
            <td>
                @Html.DisplayFor(m => action.ActionEnabled)
            </td>
            <td>
                @Html.DisplayFor(m => action.IgnoreControl)
            </td>
            <td>
                @Html.ActionLink("Edit", "Edit", new {action.Id})
                @Html.ActionLink("Delete", "Delete", new {action.Id, functionId = ViewBag.FunctionId})
            </td>
        </tr>
    }
</table>